package com.phiture.erp.produce.core.pojo.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;

@Schema(description = "管理后台 - 生产任务报工 DTO")
@Data
public class ErpProductionTaskReportDTO {

    @Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "18362")
    private Long id;

    @Schema(description = "任务单编码", requiredMode = Schema.RequiredMode.REQUIRED)
    private String productionTaskNo;

    @Schema(description = "物料ID")
    private Long materialId;

    @Schema(description = "物料", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六")
    private String materialName;

    @Schema(description = "物料编码")
    private String materialCode;

    @Schema(description = "物料规格")
    private String materialSpec;

//    @Schema(description = "物料单位", requiredMode = Schema.RequiredMode.REQUIRED)
//    @NotEmpty(message = "物料单位不能为空")
//    private String materialUnit;

    @Schema(description = "计划生产数量")
    private BigDecimal plannedQuantity;

    @Schema(description = "实际生产数量")
    @NotNull(message = "报工数量不能为空")
    private BigDecimal actualQuantity;

    @Schema(description = "开工时间")
    private Date startDateActual;

    @Schema(description = "完工时间")
    private Date endDateActual;

    @Schema(description = "合格数量")
    private BigDecimal qualifiedQuantity;

    @Schema(description = "报废数量")
    private BigDecimal scrapQuantity;

    @Schema(description = "报废原因", example = "你猜")
    private String scrapReason;

    @Schema(description = "是否最终工序", example = "1")
    private Integer finalProcess;

    @Schema(description = "生产任务单工序")
    private Long taskProcessId;



}